package com.joker.orange.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.joker.orange.domain.NovelChapter;
import com.joker.orange.domain.NovelInfo;
import com.joker.orange.domain.bo.NovelChapterBo;
import com.joker.orange.domain.vo.NovelChapterVo;
import com.joker.common.core.mapper.BaseMapperPlus;
import com.joker.orange.domain.vo.NovelInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 小说章节Mapper接口
 *
 * @author Joker
 * @date 2024-06-09
 */
public interface NovelChapterMapper extends BaseMapperPlus<NovelChapterMapper, NovelChapter, NovelChapterVo> {

    Page<NovelChapterVo> queryPageList(@Param("page") Page<NovelChapterVo> page, @Param(Constants.WRAPPER) Wrapper<NovelChapter> wrapper);

    List<NovelChapterVo> queryPageList(@Param(Constants.WRAPPER) Wrapper<NovelChapter> wrapper);

    /**
     * 查询上一章节
     */
    NovelChapterVo selectLastChapterById(NovelChapterBo bo);

    /**
     * 查询下一章节
     */
    NovelChapterVo selectNextChapterById(NovelChapterBo bo);
}
